<?php

class AddFriendVerify {
	private $message = "";
	private $blacklist = null;
    function AddFriendVerify() {
    	//echo "aa";
    }

	public function run() {
    //$this->message = "1";
    //return;
		$this->blacklist = new Blacklist();
		if ($this->blacklist->isInBlacklist()) {
			$this->message = "0:黑名单用户~~";
			return;
		}
		$api = new Api("IsClusterAdmin");
		$lv1 = $api->doApi("222048974", $_POST[Sender]);
		$lv1 = (int) $lv1;
		if($lv1<0) {
			$this->message = "0:非官方群[22204897*]成员~~";
			return ;
		}
		//if((time())
		$endTime = strtotime("2016-04-10 17:28:30");
		$startTime = strtotime("2013-06-01 00:00:00");
		$now = time()+8*3600;
		if($now>=$startTime && $now<=$endTime) {
			$this->message = "1";
      		return ;
		}else{
			$this->message = "0:已关闭加好友~~";
		}
		
		
		
	}
	
	private function __get($property_name) {
		return $this-> $property_name;
	}

	private function __set($property_name, $value) {
		$this->$property_name = $value;
	}
}
?>